package cn.wolfcode.education.mapper;

import cn.wolfcode.education.domain.Role;
import cn.wolfcode.education.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    Integer queryForCount(QueryObject qo);

    List<Role> queryForList(QueryObject qo);

    void insertRelationWithPermission(@Param("roleId") Long roleId, @Param("permissionId") Long permissionId);

    void deleteRelationWithPermission(Long id);

    List<Long> listRoleByEmployeeId(Long employeeId);

    List<String> listSnsByEmployeeId(Long employeeId);

    List<String> listAllSns();

    List<String> listSnsAll();
}